1. Field of the Invention
The invention relates generally to computer systems and more particularly to systems and methods for testing the functional compatibility of peripheral devices with a universal serial bus system.
2. Description of the Relevant Art
Since the advent of personal computers, computer users have been eager to expand the capabilities of their machines. Users, however, have experienced innumerable difficulties when confronted with the task of connecting peripheral devices to their computers. While it may be simple for a user to attach a printer to his or her computer, the connection of a device (e.g., a scanner) to a serial port presents more of a challenge. The installation of equipment internal to the computer, such as an interface card for a scanner, may present even greater difficulties, as the user may face problems in setting and DMA addresses for resolving IRQ conflicts. These difficulties can frustrate the user, particularly when they cause the computer to operate incorrectly or simply fail to operate at all.
With the rapid advances in the state of computer technology, the potential for experiencing such difficulties has grown. There have, as a result, been attempts to alleviate these problems. For example, the concept of designing plug-and-play peripheral devices was intended to alleviate difficulties of installing the devices. This concept, however, is directed primarily toward devices which are installed inside the cabinet of the computer. The installation of external peripheral devices, such as printers and scanners, is still likely to be accompanied by some of the difficulties targeted by the plug-and-play concept.
Another attempt to eliminate some of the problems attendant to the installation of peripheral devices was the introduction of PC-Card technology. (This technology was formerly termed PCMCIAxe2x80x94Personal Computer Memory Card International Association.) PC-Card (PCMCIA) peripheral devices are simply and easily inserted into a PC-Card socket and are recognized by the computer. The problem with this technology, however, was that it was originally targeted to portable computers. Although a PC-Card (PCMCIA) slot can be installed in a desktop computer, this solution simply has not been widely adopted. Thus, there remained a need for a simple and convenient plug-and-play type technology for desktop computers.
One or more of the problems outlined above may be solved by various embodiments of the system and method of the present invention. In response to the continuing difficulties in installing peripheral devices and the need for a solution to the problem, the idea of a universal serial bus (USB) was developed. The development of the USB was motivated by number of factors, including the difficulty of adding peripheral devices and the lack of additional ports for installing these devices. The USB is designed to provide plug-and-play capabilities for external peripheral devices which are connected to the I/O ports of the computer and thereby reduce the difficulties experienced by many users. The USB was also designed to provide means for installing numerous devices rather than restricting the user to one or two (one for each port on a computer which does not have a USB).
The implementation of plug-and-play capabilities through the USB is not solely dependent upon the USB. It is fundamental that the peripheral devices to be installed on the USB must be compatible with the USB. In other words, it is necessary that the devices conform to the specific characteristics of the USB. This is ensured in part by the propagation of the USB Specification, which defines these characteristics. The USB Specification is hereby incorporated herein by reference in its entirety. The designs of peripheral devices can be checked prior to manufacture through device simulations. Such verification of device designs, however, may themselves contain errors. Additionally, errors may be introduced in translation of the design into a physical device. It is therefore important to have means for verifying different aspects of USB compatibility of peripheral devices in their final physical configurations. It is also important to have means for verifying USB system functions apart from the peripheral devices. The various embodiments of the invention provide such means.
One embodiment of the invention comprises a test system which verifies the ability of USB devices to provide correct responses to a set of standard device requests. The standard device requests allow USB devices to be queried for standard device information, such as vendor identification, device class, and configuration. Other device-class related and vendor defined information may also be obtained through the standard device requests. The test system allows USB device vendors to determine whether their devices properly provide this information as provided for in the USB Specification.
Another embodiment of the invention comprises a test system which verifies the implementation of the USB Architecture Framework Support in a computer system. The USB Architecture (USBA) consists of a library of interfaces which provide channels of communication between a USB client driver and an associated USB device. The test system performs calls to the USBA interfaces and then decodes and validates test parameters to determine whether they are valid.
The test system comprises a test application and a test application driver. The test application driver interfaces with the USB system software. The USB system software, which may include a USB driver, a host controller driver and other host software, is referred to in a Solaris(trademark) implementation as the USB Framework Support. (Solaris(trademark) is a Unix operating system developed by Sun Microsystems, Inc. for use on its SPARC(trademark) workstations.) The USB driver interfaces with the test application through the test application driver. The host controller driver interfaces with the host controller, which in turn interfaces the software on the host system with the USB interconnect and USB devices.
In one embodiment, the test system incorporates a command line interpreter through which a user can enter commands to perform specific operations and tests, or combinations thereof, on the USB system. The user may thereby verify the sets of standard device requests or interface functions as part of a suite of tests, or they may be verified individually through the command line interpreter. The individual testing of the standard device requests or interface functions may be useful to avoid unnecessary tests on previously verified portions of the system. The command line interpreter allows the standard device requests and interface functions to be tested without having to create or compile a test program. Use of the command line interpreter further allows the user to execute commands in an operating system (e.g., Unix) shell without having to interrupt a USB testing or debugging session. Use of the command line interpreter also allows the user to enter commands remotely (e.g., via a modem connected to the computer system) so that the expertise of a user who is not located at the site of the computer system.